#include <bits/stdc++.h>

#define eb emplace_back
#define ep emplace
#define fi first
#define se second
#define in read<int>()
#define lin read<ll>()
#define rep(i, x, y) for(int i = (x); i <= (y); i++)
#define per(i, x, y) for(int i = (x); i >= (y); i--)

using namespace std;

using ll = long long;
using db = double;
using pii = pair < int, int >;
using vec = vector < int >;
using veg = vector < pii >;

template < typename T > T read() {
	T x = 0; bool f = 0; char ch = getchar();
	while(!isdigit(ch)) f |= ch == '-', ch = getchar();
	while(isdigit(ch)) x = x * 10 + (ch ^ 48), ch = getchar();
	return f ? -x : x;
}

template < typename T > void chkmax(T &x, const T &y) { x = x > y ? x : y; }
template < typename T > void chkmin(T &x, const T &y) { x = x < y ? x : y; }

const int N = 1e6 + 10;

int n, m, A, B, C, fa[N], low[N], dfn[N], stk[N], top, tim, tn;
vec G[N], T[N];

void dfs(int x) {
	stk[++top] = x; low[x] = dfn[x] = ++tim;
	for(auto y : G[x])
		if(!dfn[y]) {
			dfs(y); chkmin(low[x], low[y]);
			if(low[y] == dfn[x]) {
				++n; int z;
				do {
					z = stk[top--];
					T[z].eb(n), T[n].eb(z);
				} while(z != y); 
				T[n].eb(x), T[x].eb(n); 
				//cerr << n << "!" << endl; for(auto v : T[n]) cerr << v << " "; cerr << endl;
			}
		} else chkmin(low[x], dfn[y]);
}

bool vis[N];
int ok[N];

void check(int x) {
	vis[x] = true; if(x > tn) for(auto v : T[x]) ok[v]++;
	if(x == C) {
		if(ok[B]) cout << "Yes" << endl;
		else cout << "No" << endl;
		exit(0);
	}
	for(auto v : T[x]) 
		if(!vis[v]) check(v);
	if(x > tn) for(auto v : T[x]) ok[v]--;
}

int main() {
#ifdef YJR_2333_TEST
	freopen("1.in", "r", stdin);
#endif
	tn = n = in, m = in; A = in, B  = in, C = in;
	rep(i, 1, m) {
		int u = in, v = in;
		G[u].eb(v), G[v].eb(u);
	}
	dfs(A); check(A);
	return 0;
}
